use std::fmt;
use std::string::ToString;
// display to to_string
struct Circle {
    radius: i32,
}
impl fmt::Display for Circle {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Circle of radius {}", self.radius)
    }
}
// to_string
// impl ToString for Circle {
//     fn to_string(&self) -> String {
//         format!("Circle of radius {}", self.radius)
//     }
// }
fn main() {
//     display
    let c = Circle { radius: 6 };
    println!("{}", c);
    println!("{}", c.to_string());
    // parse
    let parsed: i32 = "5".parse().unwrap(); // 5
    let turbo_parsed = "10".parse::<i32>().unwrap(); // 10
    let sum = parsed + turbo_parsed;
    println!("Sum: {:?}", sum);
}
